﻿using System;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;

using ZLWeb.WebApiInfrastructure;

namespace ZLWeb.WebApiInfrastructure.Filter
{
    /// <summary>
    /// SSL过滤器
    /// todo 模仿MVC的SSL过滤器完善
    /// </summary>
    public class UseSSLAtrribute : AuthorizationFilterAttribute
    {
        
        public override void OnAuthorization(HttpActionContext actionContext)
        {
           
            //if (actionContext.Request.RequestUri.Scheme != Uri.UriSchemeHttps)
            //{
            //    throw new ValidateException("必须使用Https请求");
            //}
        }

    }
}